<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table{
            width: 50%;
            border: 1px black solid;
            margin: 0 auto;
            border-collapse: collapse;
            /* border-spacing: 100px; */
        }
        td{
            border: 1px black solid;
            height: 100px;
            vertical-align: middle;
            text-align: center;
        }
        tbody > tr:nth-child(odd){
            background-color: #bfa;
        }
        .box1{
            width: 300px;
            height: 300px;
            background-color: orange;

            /* 将元素设置为单元格 td  */
            display: table-cell;
            vertical-align: middle;
        }
        .box2{
            width: 100px;
            height: 100px;
            background-color: yellow;
            margin: 0 auto;

        }
    </style>
</head>
<body>
    <div class="box1">
        <div class="box2"></div>
    </div>
    <table > 
            <tr>
                <td>name</td>
                <td>age</td>
                <td>sex</td>
            </tr>
        <tbody>
            <tr>
                <td>孙悟空</td>
                <td>18</td>
                <td>男</td>
            </tr>
            <tr>
                <td>name</td>
                <td>age</td>
                <td>sex</td>
            </tr>
            <tr>
                <td>name</td>
                <td>age</td>
                <td>sex</td>
            </tr>
        </tbody>
        <tfoot>
            <tr>
                <td>孙悟空</td>
                <td>18</td>
                <td>男</td>
            </tr>
        </tfoot>
    </table>
</body>
</html>